import {request,request_l} from './network.js'





export function getSwiper(){
  return request_l({
    url:'index/miniprogram/getSwiper'
  })
}
export function homeGetGoods(){
  return request_l({
    url:'index/miniprogram/homeGetGoods'
  })
}

// https://api.weixin.qq.com/sns/jscode2session?appid=APPID&secret=SECRET&js_code=JSCODE&grant_type=authorization_code
export function getLogin(code){
  return  request_l({
    url:'https://api.weixin.qq.com/sns/jscode2session',
    data:{
      appid:'wx73f74df9943cf0a0',
      secret:'847a1740dc02079d963c8bc1d8dc8eae',
      js_code:code,
      grant_type:'authorization_code'
    }
  },true)

}

export function userLogin(data){
  return request_l({
    url: 'index/Miniprogram/userLogin',
    data,
    method:'post'
	})
}